package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;



@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department {
    private Long id;

    private String name;

    private String sn;

    public Department(String name, String sn) {
        this.name = name;
        this.sn = sn;
    }

    public String getJson(){
        Map map = new HashMap();
        map.put("id",id);
        map.put("name",name);
        map.put("sn",sn);
        return JSON.toJSONString(map);
    }
}